<script>
const Authentication = require('./utils/authentication.js');
const http = require('./utils/http.js');

const storage = require('./utils/storage.js');

const constants = require('./utils/constants.js');

const equipment = require('./utils/equipment.js');

export default {
    data() {
        return {};
    },
    onLaunch: function () {
		
		equipment.closePc(this);
		
		//当前平台
		let provider = "toutiao";
		
		//登录抖音 不做处理
		uni.getProvider({
			service: 'oauth',
			success: function(res) {
				provider = res.provider;
				uni.login({
				  provider: provider,
				  success: function (loginRes) {
					
				  }
				});
			}
		}) 
		
		//storage.put("date_token",'date_token',30);
		//清空缓存
		if(!storage.get(constants.TOKEN_DATE)){
			Authentication.clearCache();
		}
		
		let token = uni.getStorageSync(constants.USER_TOKEN_KEY);
		if(token == '' || token == undefined){
			Authentication.clearCache();
		}

		
    },
    globalData: {
        appName: '星光壁纸'
    }
};
</script>
<style lang="scss">
	
@import "uni_modules/uview-ui/index.scss";

/*每个页面公共css */
@import "colorui/main.css";
@import "colorui/icon.css";


page {
    background: #ffffff;
	/* #ifdef H5 */
	/* max-width: 375px  !important;margin: 0 auto !important;height: 670px !important; */
	/* #endif */
}

button::after {
    border-radius: 0;
    border: none;
}
</style>
